{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_price(order_book_ids,start_date='2013-01-04',end_date='2014-01-04',frequency='1d',fields=None,adjust_type='pre',skip_suspended=False,market='cn',expect_df=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "获取指定合约或合约列表的历史数据（包括起止日期，日线或分钟线）。  \n",
    "目前仅支持中国市场的股票、可转债、期货、ETF和上金所现货的行情数据，如黄金、铂金和白银产品。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " 参数 | 类型 | 描述 \n",
    ":-: | :-: | - |\n",
    "order_book_ids | str OR str_list | 合约代码，可传入order_book_id,order_book_id_list。  获取tick数据时，只支持单个order_book_id |\n",
    "start_date | str,datetime.date,datetime.datetime,pandas Timestamp | 开始日期，默认为'2013-01-04'。交易使用时，用户必须指定 |\n",
    "end_date | 同上 | 结束日期，默认为'2014-01-04'。交易使用时，默认为策略当前日期前一天 |\n",
    "frequency|str|历史数据的频率。现在支持日/分钟级别的历史数据，默认为'1d'。使用者可自由选取不同的频率，例如'5m'代表5分钟线。可支持期货tick级别数据获取，此时频率为tick|\n",
    "fields|str OR str_list|字段名称|\n",
    "adjust_type|str|权息修复方案。前复权-`pre`,后复权-`past`,不复权-`none`,回测使用-`internal`。需要注意，`internal`数据与回测所使用数据保持一致，仅就拆分事件对价格以及成交量进行了前复权处理，并未考虑分红派息对于股价的影响。所以在分红前后，价格会出现跳跃|\n",
    "skip_suspended|bool|是否跳过停牌数据。默认为False(不跳过)，用停牌前数据进行补齐。True则为跳过停牌期。**注意**，当设置为True时，函数order_book_id只支持单个合约传入|\n",
    "market|str|默认是中国市场（'cn'）|\n",
    "expect_df|boolean|默认返回原有的数据结构。如果为True，则返回pandas dataframe|"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**返回：**\n",
    "- 传入一个order_book_id，多个field，函数会返回一个pandas DataFrame\n",
    "- 传入一个order_book_id，一个field，函数会返回pandas Series\n",
    "- 传入多个order_book_id, 一个field,函数会返回一个pandas DataFrame\n",
    "- 传入多个order_book_id，函数会返回一个pandas Panel\n",
    "- bar数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "字段|类型|说明\n",
    ":-:|:-:|:-:|\n",
    "open|float|开盘价|\n",
    "close|float|收盘价|\n",
    "high|float|最高价|\n",
    "low|float|最低价|\n",
    "limit_up|float|涨停价|\n",
    "limit_down|float|跌停价|\n",
    "total_turnover|float|成交额|\n",
    "volume|int|成交量|\n",
    "num_trades|int|成交笔数（仅限股票日线数据）|\n",
    "settlement|float|结算价（仅限期货日线数据）|\n",
    "prev_settlement|float|昨日结算价（仅限期货日线数据）|\n",
    "open_interest|float|累计持仓量（期货专用）|\n",
    "trading_date|pandasTimeStamp|交易日期（仅限期货分钟线数据），对应期货夜盘的情况\n",
    "dominant_id|str|实际合约的order_book_id,对应期货888系主力连续合约的情况|\n",
    "settlement_direction|str|交收方向，用于现货的延期交易（仅限现货行情数据）|\n",
    "settlement_volume|float|交收量，用于现货的延期交易（仅限现货行情数据）|\n",
    "price_weighted|str|加权价格，指交易日内成交价格的加权平均（仅限现货行情数据）|\n",
    "strike_price|float|行权价，仅限50ETF期权日线数据|\n",
    "contract_multiplier|float|合约乘数，仅限50ETF期权日线数据|"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- tick数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "字段|类型|说明|\n",
    "-|-|-|\n",
    "open|float|当日开盘价|\n",
    "high|float|当日最高价|\n",
    "low|float|当日最低价|\n",
    "last|float|最新价|\n",
    "prev_settlement|float|昨日结算价|\n",
    "volume|float|成交量|\n",
    "limit_up|float|涨停价|\n",
    "limit_down|float|跌停价|\n",
    "open_interest|float|累计持仓量|\n",
    "datetime|datetime.datetime|时间戳|\n",
    "a1~a5|float|卖一至五档报盘价格|\n",
    "a1_v~a5_v|float|卖一至五档报盘量|\n",
    "b1~b5|float|买一至五档报盘价格|\n",
    "b1_v~b5_v|float|买一至五档报盘量|\n",
    "change_rate|float|涨跌幅|\n",
    "trading_date|pandasTimeStamp|交易日期，对应期货夜盘情况|"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**示例：**  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史日线行情（返回pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-5-dbb3e709a844>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('000001.XSHE',start_date='2015-04-01',end_date='2015-04-12')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史日线行情（**未经复权处理的原始数据**，返回pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-3-3b1193290bdd>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-03'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0madjust_type\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'none'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('000001.XSHE',start_date='2015-04-01',end_date='2015-04-03',adjust_type='none')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史分钟线收盘价（返回pandas Series）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-4-52e054f4dfc1>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfields\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'close'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfrequency\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'1m'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('000001.XSHE',start_date='2015-04-01', end_date='2015-04-12', fields='close', frequency='1m')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史分钟线收盘价，指定返回DataFrame形式："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-5-0ac1ad3684a7>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mfields\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'close'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mfrequency\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'1m'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mexpect_df\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('000001.XSHE',start_date='2015-04-01',end_date='2015-04-12',fields='close',frequency='1m',expect_df=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史tick行情（返回pandas DataFrame）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "get_price('000001.XSHE',start_date='20180321',end_date='20180321',frequency='tick')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一股票历史**15分钟线**行情（返回pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-7-764e58a59f7d>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mfrequency\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'15m'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('000001.XSHE',start_date='2015-04-01',end_date='2015-04-01',frequency='15m')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "获取股票列表历史日线收盘价（pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-8-8d3ff4c73836>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'000024.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'000002.XSHE'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mfields\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'close'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price(['000024.XSHE','000001.XSHE','000002.XSHE'],start_date='2015-04-01',end_date='2015-04-12',fields='close')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "获取股票列表历史日线收盘价（pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-9-08d3424a800c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'000024.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'000001.XSHE'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'000002.XSHE'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price(['000024.XSHE','000001.XSHE','000002.XSHE'],start_date='2015-04-01',end_date='2015-04-12')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "获取单一期货合约历史日线行情（返回pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-10-14672f290b9c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'A1601'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-01'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'2015-04-12'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('A1601', start_date='2015-04-01',end_date='2015-04-12')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一期货合约历史tick行情（返回pandas DataFrame）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-11-41d869ae1938>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'IF1608'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'20160801'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'20160801'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'tick'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('IF1608','20160801','20160801','tick').head"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 获取单一现货合约历史日线行情（注：上交所黄金现货的价格以克为单位，白银以千克为单位）："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-12-d41d82ed5065>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'MAUTD.SGEX'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m20180826\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m20180831\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0madjust_type\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'none'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('MAUTD.SGEX',start_date=20180826,end_date=20180831,adjust_type='none')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 50ETF期权日线数据（可以看到行权价、合约乘数在50ETF分红前后发生了变化）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'get_price' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-13-1731d5439692>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mget_price\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'10000615'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'20161125'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'20161130'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mfrequency\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'1d'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'get_price' is not defined"
     ]
    }
   ],
   "source": [
    "get_price('10000615',start_date='20161125',end_date='20161130',frequency='1d')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
